package com.bba.manager.sku.service.impl;


import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper;
import com.bba.manager.common.model.sku.CarVendor;
import com.bba.manager.common.model.sku.PartsVendor;
import com.bba.manager.sku.mapper.PartsVendorMapper;
import com.bba.manager.sku.service.IPartsVendorService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 厂商配件表 服务实现类
 * </p>
 *
 * @author SYANDZZY
 * @since 2025-08-12
 */
@Service
public class PartsVendorServiceImpl extends ServiceImpl<PartsVendorMapper, PartsVendor> implements IPartsVendorService {

    @Override
    public PartsVendor getByCarId(Long carId) {
        LambdaQueryChainWrapper<PartsVendor> wrapper = new LambdaQueryChainWrapper<>(this.baseMapper);
        return wrapper.eq(PartsVendor::getPartsNo, carId).one();
    }
}
